#include <stdio.h>
int mySqrt(int x)
{
	signed int i = 0;
	signed long long int f;
//	printf("%lld", sizeof(f));
	do
	{
		f = i * i;
		printf("%d\n", i);
		
		if (f == x)
			return i;
		if (f > x)
			return i - 1;
		i++;
	}
	while ( f < x );
	return 0;
}

int main()
{
	printf("%d", mySqrt(2147483647))	;

}
